home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
-
- <xsl:output method="html"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
- $INCLUDE(commonvar.inc)$
-
- <fd:capabilities showExcerpts="false" toggleExcerpts="false" collapsePosts="true" itemGrouping="false" />
- <xsl:variable name="feed-type" select="newspaper/channel/@feedType"/>
-
- <!-- language strings -->
- <xsl:variable name="lang_hint_open_new" select="'$LANG_CONST(S_NewsHintOpenInNewTab)$'"/>
- <xsl:variable name="lang_hint_enclosure" select="'$LANG_CONST(S_NewsHintEnclosure)$'"/>
- <xsl:variable name="lang_hint_comments" select="'$LANG_CONST(S_NewsHintComments)$'"/>
- <xsl:variable name="lang_hint_toggle_flag" select="'$LANG_CONST(S_NewsHintToggleFlag)$'"/>
- <xsl:variable name="lang_hint_addtonewsbin" select="'$LANG_CONST(S_NewsHintAddToNewsBin)$'"/>
-
- <!-- default class for item detail - defaults to collapsed unless this is a single item newspaper -->
- <xsl:variable name="default-detail-class">
- <xsl:choose>
- <xsl:when test="$item-count=1">expanded</xsl:when>
- <xsl:otherwise>collapsed</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:template match="newspaper">
- <html>
- <head>
- <title>Newspaper (<xsl:value-of select="title" disable-output-escaping="yes"/>)</title>
- $INCLUDE(metatrans.inc)$
- <style type="text/css">
- $INCLUDE(commonstyles.css)$
-
- body {
- font-size: $FONT-SIZE-NEWSPAPER$;
- font-family: "$FONT-NAME-NEWSPAPER$", "Trebuchet MS", Tahoma, sans-serif;
- margin: 11px;
- color: black;
- background-color: #fff;
- }
-
- a { color: #006ABA; text-decoration: none; }
- a:hover { text-decoration: underline; }
- a.notcached {
- text-decoration: none ! important;
- border-bottom: 1px dotted red ! important;
- }
-
- kbd, code { font-size: 100%; }
- #newspapertitle {
- width: 100%;
- margin-bottom: 12px;
- font-weight: bold;
- font-size: medium;
- text-align: left;
- }
-
- div.channeltitle { font-size: larger; margin-top: 11px; margin-bottom: 5px; font-variant: small-caps; }
- div.newsitemtitle {
- background-color: #edf3fe;
- border-bottom: 1px solid #DFEBFD;
- border-right: 1px solid #DFEBFD;
- padding: 2px 6px;
- padding-right: 0;
- margin-bottom: 3px;
- text-align: left;
- width: 100%;
- }
- <xsl:if test="$item-count > 1">
- div.newsitemtitle, img.button { cursor: pointer; }
- </xsl:if>
-
- div.newsitemtitle, div.channeltitle { clear: both; /* prevents images in newsitemcontent to wrap over title */ }
- div.newsitemcontent {
- padding: 2px 8px;
- margin-left: 37px;
- margin-top: 6px;
- margin-bottom: 12px;
- margin-right: 12px;
- }
- img.icon { border: none; margin: 0 0px;}
- img.button { margin-left: 5px; margin-right: 13px; }
- span.nodescription { font-size: x-small; color: silver;}
- .dateline { color: #6A6A6A; font-size: xx-small; margin-left: 8px; }
- .collapsed { display: none; }
- .expanded { }
- .unread { font-weight: bold; color: $COLOR-UNREAD$; }
- .normal, .unread { color: #392EA4; }
- .flagged { color: $COLOR-FLAGGED$; }
- .sep { padding: 0 4px; }
-
- div.postactions {
- display: inline;
- }
-
- div#noitems {
- color: #9099AE;
- margin-left: 4px;
- }
- #fdfocusedpost div.newsitemtitle {
- background-color: #FFFFCC;
- }
- </style>
- <!-- single news item newspaper -->
- <xsl:if test="$item-count=1 and $newspaper-type='newsitem'">
- <style type="text/css">
- body { margin: 0; }
- div.newsitemtitle { padding: 12px 22px; }
- div.newsitemcontent { margin-left: 23px; }
- </style>
- </xsl:if>
- </head>
- <body>
- <xsl:variable name="folderId" select="@folderId"/>
-
- <xsl:if test="$newspaper-type!='newsitem'">
- <div id="newspapertitle">
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </div>
- </xsl:if>
-
- <xsl:if test="$item-count=0">
- <div id="noitems">$LANG_CONST(S_NoItemsInNewspaperFilter)$</div>
- </xsl:if>
-
- <xsl:for-each select="channel">
- <xsl:sort select="title"/>
- <xsl:variable name="groupid"><xsl:value-of select="generate-id()"/></xsl:variable>
- <!-- only show channel title for folder newspaper -->
- <xsl:if test="$newspaper-type='folder'">
- <div class="channeltitle">
- <xsl:variable name="chanlink" select="link"/>
- <a href="{$chanlink}"><xsl:value-of select="title"/></a>
- </div>
- </xsl:if>
- <!-- process news items -->
- <xsl:for-each select="item">
- <xsl:sort select="@sortIndex" data-type="number"/>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
-
- <!-- news item template -->
- <xsl:template match="item">
- <xsl:variable name="feedId" select="@feedId"/>
- <xsl:variable name="postId" select="@postId"/>
-
- <xsl:variable name="itemlink" select="link"/>
- <div class="fdnewsitem" name="{$feedId}:{$postId}">
- <a href="fdaction:?action=togglecollapse&id={$postId}">
- <div class="newsitemtitle" id="{$postId}_container">
- <a href="fdaction:?action=togglecollapse&id={$postId}">
- <xsl:choose>
- <xsl:when test="$item-count > 1"><img src="$IMAGEDIR$arrowright.gif" id="{$postId}_img_expand" border="0" align="absmiddle" class="button" /></xsl:when>
- <xsl:otherwise><img src="$IMAGEDIR$arrowdown.gif" id="{$postId}_img_expand" border="0" align="absmiddle" class="button" /></xsl:otherwise>
- </xsl:choose>
- </a>
-
- <!-- assign class based on unread/flagged state -->
- <xsl:variable name="itemclass">
- <xsl:choose>
- <xsl:when test="state/@read=0 and state/@flagged!=0">unread flagged</xsl:when>
- <xsl:when test="state/@read=0">unread</xsl:when>
- <xsl:when test="state/@flagged!=0">flagged</xsl:when>
- <xsl:otherwise>normal</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <a id="{$postId}_title" href="fdaction:?action=gotopostlink&feedid={$feedId}&postid={$postId}&markpostread=1" class="{$itemclass}">
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </a>
- <span class="dateline" id="{$postId}_dateline">
- $INCLUDE(postactions.inc)$
-
- <xsl:if test="enclosure">
- <xsl:variable name="enclosurelink" select="enclosure/@url"/>
- <xsl:variable name="enclosuretype" select="enclosure/@type"/>
- <span class="sep">|</span>
- <a class="icon" href="fdaction:?action=downloadenclosure&feedid={$feedId}&postid={$postId}&url={$enclosurelink}" title="$LANG_CONST(S_NewsHintEnclosure)$">
- <img src="$IMAGEDIR$enclosure.gif" class="icon" align="absmiddle" />
- </a>
- </xsl:if>
-
- <xsl:if test="author">
- <span class="sep">|</span>
- <xsl:value-of select="author" disable-output-escaping="yes"/>
- </xsl:if>
- <span class="sep">|</span>
- <xsl:value-of select="dateDisplay"/>
- <span class="sep">|</span>
- <xsl:if test="source and source/@htmlUrl">
- <xsl:variable name="srclink" select="source/@htmlUrl"/>
- <a href="{$srclink}"><xsl:value-of select="source"/></a>
- <span class="sep">|</span>
- </xsl:if>
-
- <a href="fdaction:?action=gotopostlink&newtab=1&feedid={$feedId}&postid={$postId}&markpostread=1" class="{$itemclass}" title="{$lang_hint_open_new}">
- <img src="$IMAGEDIR$linknew.gif" class="icon" align="absmiddle" />
- </a>
-
- </span>
- </div>
- </a>
- <div class="newsitemcontent {$default-detail-class}" id="{$postId}_group">
- <xsl:value-of select="description" disable-output-escaping="yes"/>
- </div>
- </div>
- </xsl:template>
-
- </xsl:stylesheet>